<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});
//通过路由指向一个控制的方法
Route::get('/','EntryController@index');
//处理注册模板路由
Route::get('/regist','RegistController@regist')->name('regist');
//处理注册路由
Route::post('/regist','RegistController@store')->name('regist');
//加载登录模板路由
Route::get('/login','LoginController@loginForm')->name('login');
//处理登录路由
Route::post('/login','LoginController@login')->name('login');
//退出路由
Route::get('/logout','LoginController@logout')->name('logout');
//加载修改资料模板路由
Route::get('/password','PasswordController@changePassword')->name('password');
//处理修改资料路由
Route::post('/password','PasswordController@password')->name('password');
//用户管理资源路由
Route::resource('/user','UserController');
//激活账号路由
Route::get('/jihuo/{token}','RegistController@jihuo')->name('jihuo');
//输入邮箱地址路由
Route::get('/writeEmail','ForgetPassword@writeEmail')->name('writeEmail');
//加载邮箱地址后的post路由
Route::post('/sendEmail','ForgetPassword@sendEmail')->name('sendEmail');
//忘记密码的修改密码路由
Route::get('/gaimima/{email}','ForgetPassword@changePassword')->name('gaimima');
//操作修改密码路由
Route::post('/change','ForgetPassword@change')->name('change');
//定义博客资源路由
Route::resource('/blog','BlogController');
